﻿CREATE FUNCTION [steve].[udfSteve_Similarity]
(
	@TotalWeight decimal(38,7),
	@CommonWeight decimal(38,7),
	@LeftTotalWeight decimal(38,7),
	@RightTotalWeight decimal(38,7)
)
RETURNS decimal(8,7)
AS
BEGIN
	--Tanimoto coefficient
	RETURN @CommonWeight / (@LeftTotalWeight + @RightTotalWeight - @CommonWeight)
END